package cn.pconline.autoclub.entity;

import java.util.Date;
import org.gelivable.dao.Column;
import org.gelivable.dao.Entity;
import org.gelivable.dao.Id;
import org.gelivable.dao.Transient;

/**
 *
 * 加入车友会的申请
 *
 * @author wanganning
 */
@Entity(tableName = "ac_member_application", logChange = true)
public class MemberApplication implements EntityWithUserProp{
    public static final int STATUS_UNAUDITED = 0; //未审
    public static final int STATUS_PASS = 1; //通过
    public static final int STATUS_REJECT = -1; //拒绝
    public static final int STATUS_CANCEL = -2; //自己取消
    @Id
    @Column(name = "id")
    private long id;
    @Column(name = "user_id")
    private long uid;
    @Column(name = "club_id")
    private long clubId;
    @Column(name = "create_at")
    private Date createAt;
    @Column(name = "status")
    private int status;
    @Column(name = "audit_by")
    private long auditBy;
    @Column(name = "audit_at")
    private Date auditAt;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Override
    public long getUid() {
        return uid;
    }

    @Override
    public void setUid(long uid) {
        this.uid = uid;
    }

    public long getClubId() {
        return clubId;
    }

    public void setClubId(long clubId) {
        this.clubId = clubId;
    }

    public Date getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Date createAt) {
        this.createAt = createAt;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public long getAuditBy() {
        return auditBy;
    }

    public void setAuditBy(long auditBy) {
        this.auditBy = auditBy;
    }

    @Transient(cache=false)
    private User user;

    public void setUser(User user) {
        this.user = user;
    }

    public User getUser() {
        return user;
    }

	public Date getAuditAt() {
		return auditAt;
	}

	public void setAuditAt(Date auditAt) {
		this.auditAt = auditAt;
	}

}
